package modele;

import java.util.Comparator;

public class ComparatorArticleNote implements Comparator<Article>{

	public ComparatorArticleNote(){
	}
		
	public int compare(Article arg0, Article arg1) {
		int resultat=-1;
		float note1=arg0.getNoteMoyenne();
		float note2=arg1.getNoteMoyenne();
		if(note1>note2){
			resultat=1;
		}
		else if (note1==note2){
			resultat=0;
		}
		return resultat;
	}

}